package tsli.acm.dao;

import tsli.acm.database.Database;
import tsli.acm.model.TempAg;

/** 
 * ไม่ได้ใช้งาน
 * @author SARUNYOO
 *
 */
public class TempAgDAO {

	private Database db;

	public TempAgDAO(Database db) {
		this.db = db;
	}

	public boolean insert(TempAg tempAg) {
		boolean act = false;
		try {
			String sql = "insert into tsli_temp_ag ( TEMP_ID , PE_NO_SM , PE_NO , PC_AG , PO_CLOS_YM)"
					+ " VALUES ( ? , ? , ?  , ?  , ?) ";
			this.db.insert(sql, tempAg.getVaTempId(), tempAg.getVaPeNoSm(),
					tempAg.getVaPeNo(), tempAg.getVaPcAg() , tempAg.getVaPoClosYm());
			act = true;
		} catch (Exception ex) {
			ex.printStackTrace();
			act = false;
		}
		return act;
	}
}
